import time

from selenium.webdriver import Firefox

# 一定要导入这个包
from selenium.webdriver.common.by import By
'''
自动化测试采集
'''

#创建浏览器对象
# executable_path: 指定浏览器驱动的路径，可以不写

url = 'https://www.jxmm.net/pic/11787_2.html'
web = Firefox()

web.get(url)
title = web.title
content = web.page_source
current_url = web.current_url

'/html/body/div[2]/div[1]/div[1]'
el = web.find_element(By.XPATH, 'html/body/div[2]/div[1]/div[2]/a/img').get_attribute('src')
time.sleep(3)
web.close()
web.quit()
print(111)
print(el)
print(222)